package com.mybatis.example.dao;

import com.mybatis.example.dao.utils.MyBatisUtils;
import com.mybatis.example.pojo.Student;
import com.mybatis.example.pojo.Teacher;
import org.apache.ibatis.session.SqlSession;
import org.apache.log4j.Logger;
import org.junit.Test;

public class testTeacherMapper {
    Logger logger =  Logger.getLogger(testTeacherMapper.class);
    @Test
    public void test(){
        SqlSession sqlSession = MyBatisUtils.getSqlSession();
        TeacherMapper mapper = sqlSession.getMapper(TeacherMapper.class);
        Teacher teacher = mapper.getTeacherById(1);
        System.out.println(teacher);
        sqlSession.close();
    }
}
